<form role="form" action="" class="frm-operate" method="post">
    <div class="card shadow-none">
        <div class="card-body">
            <div class="form-group row">
                <label for="frm-title" class="col-sm-2 row-form-label"><span class="text-danger">*</span> {:lang("Title")}</label>
                <div class="col-sm-8">
                    <input type="text" id="frm-title" class="form-control" name="row[title]" data-rule="required">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-mark" class="col-sm-2 row-form-label"><span class="text-danger">*</span> {:lang("Mark")}</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-mark" name="row[mark]" data-rule="required" placeholder="">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-subtitle" class="col-sm-2 row-form-label">{:lang("Subtitle")}</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-subtitle" name="row[subtitle]">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-image" class="col-sm-2 row-form-label">{:lang("Image")}</label>
                <div class="col-sm-8 fileGroup">
                    <div class="file-btn">
                        <input type="text" class="form-control txt-files" id="frm-image" name="row[image]">
                        <button type="button"
                                class="btn btn-default btn-imgUpload"
                                data-mimetype="image/*"
                                data-multiple="false"
                                data-field="frm-image"><i class="fas fa-upload"></i> {:lang('Upload')}</button>
                        <button type="button"
                                class="btn btn-default btn-imgSelect"
                                data-mimetype="image/*"
                                data-multiple="false"
                                data-field="frm-image"><i class="fas fa-images"></i> {:lang('Select')}</button>
                    </div>
                    <div class="file-preview row mt-2"></div>
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-icon" class="col-sm-2 row-form-label">{:lang("icon")}</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" id="frm-icon" name="row[icon]">
                </div>
            </div>
            <div class="form-group row">
                <label for="frm-weigh" class="col-sm-2 row-form-label">{:lang("weigh")}</label>
                <div class="col-sm-8">
                    <input type="number" class="form-control" id="frm-weigh" name="row[weigh]" value="100">
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-2 row-form-label">{:lang("New window")}</label>
                <div class="col-sm-8">
                    {:build_radios('row[target]',['1'=>lang("Yes"),'0'=>lang("No")])}
                </div>
            </div>
<!--            <div class="form-group row">-->
<!--                <label class="col-sm-2 row-form-label">{:lang("Is default")}</label>-->
<!--                <div class="col-sm-8">-->
<!--                    {:build_radios('row[is_default]',['1'=>lang("Yes"),'0'=>lang("No")],'0')}-->
<!--                </div>-->
<!--            </div>-->
            <div class="form-group row">
                <label class="col-sm-2 row-form-label">{:lang("Status")}</label>
                <div class="col-sm-8">
                    {:build_radios('row[status]',['1'=>lang("Normal"),'0'=>lang("Hidden")])}
                </div>
            </div>
            <input type="hidden" value="{$module}" name="row[module]">
            <div class="form-group row">
                <label class="col-sm-2 row-form-label">{:lang("Sync add to")}</label>
                <div class="col-sm-8">
                    <div class="radio-group">
                        {volist name="moduleArr" id="vo"}
                        {if $key!=$module}
                        <div class="radio-item">
                            <input id="row[sync]-{$key}" name="row[sync][]" type="checkbox" value="{$key}">
                            <label for="row[sync]-{$key}">{$vo}</label>
                        </div>
                        {/if}
                        {/volist}
                    </div>
                </div>
            </div>
        </div>
        <div class="card-footer">
            <div class="row justify-content-around">
                <div class="col-sm-8">
                    <button type="submit" class="btn btn-primary btn-submit">{:lang('Submit')}</button>
                    <button type="reset" class="btn btn-default">{:lang('Reset')}</button>
                </div>
            </div>
        </div>
    </div>
</form>

{block:script}
<script>
    require(['admin','form'], function (admin,Form) {
        Form.api.init();
    })
</script>
{/block:script}
